package com.ruoyi.project.cms.warehouse.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.cms.warehouse.domain.CmsStockInfo;
import com.ruoyi.project.cms.warehouse.mapper.CmsStockInfoMapper;
import com.ruoyi.project.cms.warehouse.service.IInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InfoServiceImpl implements IInfoService {

    @Autowired
    private CmsStockInfoMapper cmsStockInfoMapper;


    @Override
    public List<CmsStockInfo> selectAll(CmsStockInfo info) {
        return cmsStockInfoMapper.selectAll(info);
    }

    @Override
    public int deleteByid(String ids) {
        Long[] info = Convert.toLongArray(ids);
        return cmsStockInfoMapper.deleteByids(info);
    }

    @Override
    public CmsStockInfo findById(Integer id) {
        return cmsStockInfoMapper.findById(id);
    }

    @Override
    public int addInfo(CmsStockInfo info) {
        return cmsStockInfoMapper.addInfo(info);
    }
}
